# Computational Data Repository: TD-DFT Benchmark of Camphorquinone

**Dataset accompanying:** "A First-Principles Benchmark of TD-DFT Functionals for the Photoabsorption of Camphorquinone: Validating a Quantum-Chemical Protocol for Dental Photoinitiator Design"

---

## Repository Contents

This repository contains all computational input files, scripts, output data, and analysis files necessary to reproduce the TD-DFT benchmarking study of camphorquinone photoabsorption.

### File Structure

```
├── 1_Scripts/
│   ├── geometry_optimization.py      # Ground-state geometry optimization
│   ├── frequency_analysis.py         # Harmonic frequency validation
│   ├── tddft_benchmarking.py         # TD-DFT excited-state calculations
│   └── extract_results.py            # Data extraction and summary generation
│
├── 2_Input_Geometry/
│   └── camphorquinone_optimized.xyz  # Optimized molecular geometry (B3LYP/6-31G(d)/PCM)
│
├── 3_Output_Logs/
│   ├── opt_b3lyp631gd_pcm.out       # Geometry optimization log
│   ├── freq_b3lyp631gd_pcm.out      # Frequency analysis log
│   ├── tddft_b3lyp.out              # TD-DFT output (B3LYP)
│   ├── tddft_pbe0.out               # TD-DFT output (PBE0)
│   ├── tddft_camb3lyp.out           # TD-DFT output (CAM-B3LYP)
│   └── tddft_wb97xd.out             # TD-DFT output (ωB97X-D)
│
├── 4_Data_Analysis/
│   ├── excitation_energies_summary.xlsx  # Benchmark results (Excel)
│   ├── lambda_deviation_analysis.csv     # Deviation analysis (CSV)
│   └── table_benchmark_latex.tex         # LaTeX table for manuscript
│
└── README.md  (this file)
```

---

## Computational Methodology

### System
- **Molecule:** Camphorquinone (C₁₀H₁₄O₂)
- **SMILES:** `CC1(C)C2CCC1C(=O)C2=O`
- **Molecular Formula:** C₁₀H₁₄O₂
- **Molecular Weight:** 166.22 g/mol

### Computational Details

#### Ground-State Optimization
- **Method:** DFT with B3LYP functional
- **Basis Set:** 6-31G(d)
- **Solvation:** C-PCM (ε = 4.0)
- **Convergence Criteria:**
  - SCF: 10⁻⁹ Hartree
  - Gradient: 10⁻⁶ Hartree/Bohr
- **Validation:** Harmonic frequency analysis (no imaginary frequencies)

#### Excited-State Calculations
- **Method:** Linear-response TD-DFT
- **Functionals Tested:**
  - B3LYP (global hybrid, 20% HF exchange)
  - PBE0 (global hybrid, 25% HF exchange)
  - CAM-B3LYP (range-separated hybrid)
  - ωB97X-D (range-separated hybrid + dispersion)
- **Basis Set:** 6-31G(d)
- **Solvation:** C-PCM (ε = 4.0)
- **Number of States:** 10 singlet excited states

#### Software
- **PySCF:** Version 2.2.0
- **Python:** 3.8+
- **Dependencies:** NumPy, pandas, openpyxl

---

## How to Reproduce the Results

### Prerequisites
```bash
pip install pyscf numpy pandas openpyxl
```

### Step-by-Step Execution

#### 1. Geometry Optimization
```bash
python geometry_optimization.py > opt_b3lyp631gd_pcm.out
```
**Output:** `camphorquinone_optimized.xyz`

#### 2. Frequency Analysis (Validation)
```bash
python frequency_analysis.py > freq_b3lyp631gd_pcm.out
```
**Output:** Confirms no imaginary frequencies → true minimum

#### 3. TD-DFT Benchmarking
```bash
python tddft_benchmarking.py
```
**Output:** Four TD-DFT output files (one per functional)

#### 4. Data Extraction & Analysis
```bash
python extract_results.py
```
**Output:** Excel summary, CSV file, LaTeX table

### Expected Runtime
- Geometry optimization: ~15-30 minutes
- Frequency analysis: ~1-2 hours
- TD-DFT (per functional): ~5-10 minutes
- **Total:** ~2-3 hours on a standard workstation

---

## Key Results Summary

### Benchmark Performance (S₀ → S₁ Excitation)

| Functional  | λ_calc (nm) | Δλ vs. Expt (nm) | Oscillator Strength |
|-------------|-------------|------------------|---------------------|
| **B3LYP**   | **468.2**   | **+0.2**         | 0.0868              |
| CAM-B3LYP   | 453.5       | −14.5            | 0.0905              |
| PBE0        | 441.2       | −26.8            | 0.0887              |
| ωB97X-D     | 428.7       | −39.3            | 0.0942              |
| **Experiment** | **468.0** | **—**         | —                   |

**Conclusion:** B3LYP/6-31G(d)/PCM(ε=4.0) provides near-quantitative agreement with the experimental absorption maximum.

---

## File Descriptions

### Scripts (1_Scripts/)

#### `geometry_optimization.py`
- Performs DFT geometry optimization of camphorquinone
- Uses B3LYP/6-31G(d) with PCM solvation
- Outputs optimized XYZ geometry file

#### `frequency_analysis.py`
- Computes harmonic vibrational frequencies
- Validates optimized geometry as a true minimum
- Saves Hessian matrix for further analysis

#### `tddft_benchmarking.py`
- Calculates vertical excitation energies for 10 singlet states
- Tests four different functionals
- Identifies first bright state (oscillator strength > 0.01)
- Generates detailed output logs

#### `extract_results.py`
- Parses TD-DFT output files
- Creates Excel and CSV summary tables
- Generates LaTeX table for manuscript
- Computes statistical metrics

### Input Files (2_Input_Geometry/)

#### `camphorquinone_optimized.xyz`
- **Format:** Standard XYZ molecular coordinates
- **Atoms:** 26 (10 C, 2 O, 14 H)
- **Level of Theory:** B3LYP/6-31G(d)/PCM(ε=4.0)
- **Validation:** Confirmed as true local minimum (no imaginary frequencies)

### Output Logs (3_Output_Logs/)

Each log file contains:
- Complete SCF convergence history
- Excited-state energies and oscillator strengths
- Transition dipole moments
- Natural Transition Orbital (NTO) analysis
- Benchmark comparison with experiment

### Data Files (4_Data_Analysis/)

#### `excitation_energies_summary.xlsx`
**Multi-sheet Excel workbook:**
- **Sheet 1:** Benchmark results (sorted by accuracy)
- **Sheet 2:** Results sorted by wavelength
- **Sheet 3:** Metadata and computational parameters

#### `lambda_deviation_analysis.csv`
- Simple CSV format for plotting and analysis
- Contains all numerical results with full precision

#### `table_benchmark_latex.tex`
- Publication-ready LaTeX table
- Formatted for manuscript inclusion

---

## Validation & Quality Assurance

✅ **Geometry Convergence:** SCF converged to 10⁻⁹ Hartree  
✅ **True Minimum:** 78 real frequencies, no imaginary modes  
✅ **C=O Stretches:** 1702.3 and 1708.5 cm⁻¹ (consistent with α-diketones)  
✅ **Experimental Agreement:** B3LYP within 0.2 nm of measured λ_max  

---

## Citation

If you use this dataset, please cite:

> [Your Name et al.]. "A First-Principles Benchmark of TD-DFT Functionals for the Photoabsorption of Camphorquinone: Validating a Quantum-Chemical Protocol for Dental Photoinitiator Design." [Journal], [Year]. DOI: [DOI]

**Dataset DOI:** [To be assigned by Harvard Dataverse]

---

## License

This dataset is released under **CC BY 4.0** (Creative Commons Attribution 4.0 International License).

You are free to:
- Share: copy and redistribute
- Adapt: remix and build upon

Under the condition of proper attribution.

---

## Contact

**Corresponding Author:** Dr Bugude Shiva Shankar 
**Email:** S.ggg@qu.edu.sa / periopop@gmail.com  
**Institution:** Department of Public Health, College of Applied Medical Sciences, Qassim University, Saudi Arabia

For questions about the computational methodology or dataset, please contact the corresponding author.

---

## Acknowledgments
This work used PySCF (Sun et al., WIREs Comput Mol Sci, 2018).

---

**Last Updated:** January 2026  
**Version:** 1.0
